<!DOCTYPE html>
<html>

	<head lang="en">
		<title>找攻略</title>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
		<link rel="stylesheet" href="/js/bootstrap/css/bootstrap.min.css">
		<script src="/js/jquery/jquery.min.js"></script>
		<script src="/js/bootstrap/js/bootstrap.min.js"></script>
		<link rel="stylesheet" href="/css/font/css/font-awesome.min.css" />
		<link rel="stylesheet" href="/css/reset.css" />
		<link rel="stylesheet" href="/css/strategy.css" />
		<script src="/js/plugins/jrender/jrender.min.js"></script>
		<link rel="stylesheet" href="/js/plugins/dialog2/dialog.css">
		<script src="/js/plugins/dialog2/dialog.min.js"></script>

		<script>
            $(function () {
                var keyword = sessionStorage.getItem("keyword");
                //搜索
				$.get("/strategies/search", {keyword: keyword}, function (data) {
                    console.log(data);
                    $("#hotStrategy").renderValues({list:data},{
                        setHref:function (item, value) {
                            //重新设置href
                            $(item).attr("href",$(item).attr("href")+value)
                        }
					})
					//搜索框回显
					$("#searchBtn").val(keyword);

                })

            })
		</script>
	</head>

	<body>
	<div class="search-head">
		<div class="row nav-search">
			<div class="col-2">
				<a href="index.html">
					<span><i class="fa fa-chevron-left fa-2x"></i></span>
				</a>
			</div>
			<div class="col-10">
				<div class="input-group-sm search">
					<input id="searchBtn" class="form-control searchBtn" placeholder="找攻略">
				</div>
			</div>
		</div>
	</div>

	<ul class="nav nav-pills nav-justified border border-left-0 border-top-0 border-right-0" id="pills-tab" role="tablist">
		<li class="nav-item">
			<a class="nav-link active show" id="pills-top-tab" data-toggle="pill" href="#pills-top">
				<span style="font-weight: bold;">查询结果</span>
			</a>
		</li>

	</ul>
	<div class="tab-content" id="pills-tabContent">
		<div class="tab-pane fade active show" id="pills-top">
			<div class="container strategyCommend">
				<h6>搜索结果</h6>
				<div id="hotStrategy">
					<div class="row hot" render-loop="list">
						<div class="col-4">
							<a href="strategyCatalogs.html?strategyId=" render-fun="setHref" render-key="list.id">
								<img render-src="list.coverUrl">
								<p render-html="list.title"></p>
							</a>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	</body>

</html>